﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;
using ExtendPropertyLib.WPF;

namespace ExORMDesginer.UserControls
{
    /// <summary>
    /// Interaction logic for CodeGeneratorView.xaml
    /// </summary>

    public partial class CodeGeneratorView : UserControl, ICodeGeneratorView
    {
        public CodeGeneratorView()
        {
            InitializeComponent();
        }

        private void UserControl_Loaded(object sender, RoutedEventArgs e)
        {
            previewEditer.Init();
            templateEditer.Init();
        }

        public void SetTemplateText(string msg)
        {
            templateEditer.textEditor.Text = msg;
        }

        public string GetTemplateText()
        {
            return templateEditer.textEditor.Text;
        }

        public void SetPreviewText(string msg)
        {
            previewEditer.textEditor.Text = msg;
        }

        public string GetPreviewText()
        {
            return previewEditer.textEditor.Text;
        }
    }
}
